CC = gcc
CFLAGS = -lm

SRC = src
OBJ = obj
BIN = bin

PROGRAM = Black_Scholes

all: black_scholes.o compile

compile:
	@$(CC) $(OBJ)/*.o -o $(BIN)/$(PROGRAM) $(CFLAGS)
	@echo completed compilation!!

black_scholes.o:
	@echo black_scholes.o compiled
	@$(CC) -c $(SRC)/$(PROGRAM).c -o $(OBJ)/$(PROGRAM).o $(CFLAGS)

run:
	@echo running...
	@./$(BIN)/$(PROGRAM) < entrada_blackscholes.txt

time:
	@echo running...
	@/usr/bin/time -f "%e" ./$(BIN)/$(PROGRAM) < entrada_blackscholes.txt

clear:
	@rm $(BIN)/* $(OBJ)/*.o
